#ifndef HUD_ITEM_TRIANGLE_MESH_H
#define HUD_ITEM_TRIANGLE_MESH_H

#include "consts.h"
#include "cash.h"

class HUD_ITEM_TRIANGLE_MESH : public QObject, public QGraphicsItemGroup
{
    Q_OBJECT
    Q_PROPERTY(qreal transparent READ Transparent WRITE setTransparent)

private:
    GRAPHICS_PIXMAP_ITEM *item_blue;
    GRAPHICS_PIXMAP_ITEM *item_red;

//property animation for blue
    QPropertyAnimation *prop_anim_blue;

//property animation for red
    QPropertyAnimation *prop_anim_red;

    CASH *cash;

public:
    HUD_ITEM_TRIANGLE_MESH(CASH *cash);
    QPainterPath shape() const;
    QRectF boundingRect() const;

    void load();

    void standart();
    void damage();
    void shield_destroyed();

    void show();
    void hide();

    ~HUD_ITEM_TRIANGLE_MESH();

private:
    qreal Transparent();
    void setTransparent(qreal value);

private slots:
    void slot_standart();


};

#endif // HUD_ITEM_TRIANGLE_MESH_H
